#绝对布局  窗口指定每一个控件显示的坐标和大小来布局的
import sys
from  PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
class Example(QWidget):
    def __init__(self,parent=None):
        super(Example,self).__init__(parent)
        self.initUI()
    def initUI(self):
        hbox=QHBoxLayout(self)
        self.setWindowTitle("Qsplitter")
        self.setGeometry(300,300,300,200)
        topleft=QFrame()
        topleft.setFrameShape(QFrame.StyledPanel)
        bottom = QFrame()
        bottom.setFrameShape(QFrame.StyledPanel)
        splitter1=QSplitter(Qt.Horizontal)
        textedit=QTextEdit()
        splitter1.addWidget(topleft)
        splitter1.addWidget(textedit)
        splitter1.setSizes([100,200])
        splitter2=QSplitter(Qt.Vertical)
        splitter2.addWidget(splitter1)
        splitter2.addWidget(bottom)
        hbox.addWidget(splitter2)
        self.setLayout(hbox)

if __name__ == '__main__':
    app=QApplication(sys.argv)
    demo=Example()
    demo.show()
    sys.exit(app.exec_())
